package com.wiken.storeservice.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wiken.storeservice.DTO.GeographicLocation;
import com.wiken.storeservice.VO.StoreActivityVO;
import com.wiken.storeservice.entity.StoreActivity;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author wiken
 * @since 2022-12-28
 */

//因为名字没起好，这个activity可以理解为优惠劵
public interface IStoreActivityService extends IService<StoreActivity> {

    //添加店铺活动
    boolean addStoreActivity(StoreActivity storeActivity, String token);

    //管理员添加活动
    boolean addStoreActivityByAdministrator(StoreActivity storeActivity, String token);

    //查询本店铺发布的活动
    Page<StoreActivity> getStoreActivityByStoreId(String storeId);

    Page<StoreActivityVO> getStoreActivityByUserId(Page page, String token);

    //查询管理员发布的活动
    Page<StoreActivity> getStoreActivityByAdministrator(String token);

    //查询所有发布的活动
    Page<StoreActivity> getStoreActivityList(Page page);

    boolean discountStoreNumberById(String id);

    List<StoreActivityVO> getStoreActivityNearby(GeographicLocation geographicLocation);
}
